﻿using System.Windows;

namespace Songhay.Wpf.Mvvm.Views
{
    using ViewModels;

    /// <summary>
    /// Application About… View.
    /// </summary>
    public partial class AboutView : Window
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AboutView"/> class.
        /// </summary>
        public AboutView()
        {
            InitializeComponent();

            this.WindowStartupLocation = (this.Owner != null)
                ? WindowStartupLocation.CenterOwner
                : WindowStartupLocation.CenterScreen;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="AboutView"/> class.
        /// </summary>
        /// <param name="viewModel">The view model.</param>
        public AboutView(AboutViewModel viewModel)
        {
            InitializeComponent();

            this.WindowStartupLocation = (this.Owner != null)
                ? WindowStartupLocation.CenterOwner
                : WindowStartupLocation.CenterScreen;

            this.AboutCanvas.DataContext = viewModel;
        }
    }
}
